package tm;

/**
 * @author haoly
 * @title TMConfiguration
 * @date 2025/4/23 13:35
 * @description 图灵机配置类
 */
public class TMConfiguration<T> {
    private final T state;

    private final Tape tape;

    public TMConfiguration(T state, Tape tape) {
        this.state = state;
        this.tape = tape;
    }

    public T getState() {
        return state;
    }

    public Tape getTape() {
        return tape;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("#<struct TMConfiguration ");
        sb.append("state=").append(state).append(",");
        sb.append("tape=").append(tape);
        sb.append(">");

        return sb.toString();
    }
}
